package com.hc.controller;

import com.hc.entity.Environmentmv;
import com.hc.service.IEnvironmentmvService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/environment")
@Api(description = "环境返回数据")
public class EnvironmentController {

    @Autowired
   private IEnvironmentmvService environmentmvService;

    @GetMapping("/selectenvironmentday")
    Map<String,List<Environmentmv>> selectenvironmentday(String Date){

        Map<String, List<Environmentmv>> stringListMap = environmentmvService.selectEnvironmentmvday(Date);
        return stringListMap;
    }
    @GetMapping("selecteEnironMentMonth")
    Map<String, List<Environmentmv>> selecteEnironMentMonth(String equipment_name,String startdate,String enddate){
        Map<String, List<Environmentmv>> stringListMap = environmentmvService.selectEnvironmentmvmonth(equipment_name, startdate, enddate);
        return stringListMap;
    }



}
